<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var s = 0
      for (var i = 1; i <= 100; i++) {
        s += i
      }
      document.write("总数:", s, "<br>", "平均数:", s / 100)
    </script>
  </body>
</html>
